package cn.helele.service;

import cn.helele.entity.User;
import cn.helele.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserService {

    @Autowired
    private UserMapper userMapper;

    public User getUserById(int id) {
        return userMapper.selectByPrimaryKey(id);
    }

    public List<User> getUserAll() {
        return userMapper.selectAll();
    }
}
